%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for mutations/v4/rbac.createLeftArm"
    Bucket0("Bucket 0 (root)"):::bucket
    Bucket1("Bucket 1 (mutationField)<br />Deps: 13, 14, 16<br /><br />1: PgInsertSingle[10]<br />2: <br />ᐳ: Object[15]"):::bucket
    Bucket2("Bucket 2 (nullableBoundary)<br />Deps: 15, 10, 16<br /><br />ROOT Object{1}ᐸ{result}ᐳ[15]"):::bucket
    Bucket3("Bucket 3 (nullableBoundary)<br />Deps: 10, 16<br /><br />ROOT PgInsertSingle{1}ᐸleft_arm()ᐳ[10]"):::bucket
    end
    Bucket0 --> Bucket1
    Bucket1 --> Bucket2
    Bucket2 --> Bucket3

    %% plan dependencies
    __InputObject6{{"__InputObject[6∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]"}}:::plan
    __InputObject8{{"__InputObject[8∈0] ➊<br />More deps:<br />- Constantᐸ0.66ᐳ[25]"}}:::plan
    __InputObject8 --> __InputObject6
    Object13{{"Object[13∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access11{{"Access[11∈0] ➊<br />ᐸ2.pgSettingsᐳ"}}:::plan
    Access12{{"Access[12∈0] ➊<br />ᐸ2.withPgClientᐳ"}}:::plan
    Access11 & Access12 --> Object13
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ"]:::plan
    __Value2 --> Access11
    __Value2 --> Access12
    ApplyInput14{{"ApplyInput[14∈0] ➊"}}:::plan
    __InputObject6 --> ApplyInput14
    PgInsertSingle10[["PgInsertSingle[10∈1] ➊<br />ᐸleft_arm()ᐳ"]]:::sideeffectplan
    Object13 & ApplyInput14 --> PgInsertSingle10
    Object15{{"Object[15∈1] ➊<br />ᐸ{result}ᐳ"}}:::plan
    PgInsertSingle10 --> Object15
    List19{{"List[19∈3] ➊<br />ᐸ16,17ᐳ<br />More deps:<br />- Constantᐸ'left_arms'ᐳ[16]"}}:::plan
    PgClassExpression17{{"PgClassExpression[17∈3] ➊<br />ᐸ__left_arm__.”id”ᐳ"}}:::plan
    PgClassExpression17 --> List19
    Access18{{"Access[18∈3] ➊<br />ᐸ10.tᐳ"}}:::plan
    Access18 --> PgClassExpression17
    PgInsertSingle10 --> Access18
    Lambda20{{"Lambda[20∈3] ➊<br />ᐸbase64JSONEncodeᐳ"}}:::plan
    List19 --> Lambda20
    PgClassExpression22{{"PgClassExpression[22∈3] ➊<br />ᐸ__left_arm...person_id”ᐳ"}}:::plan
    Access18 --> PgClassExpression22
    PgClassExpression23{{"PgClassExpression[23∈3] ➊<br />ᐸ__left_arm...in_metres”ᐳ"}}:::plan
    PgClassExpression22 o--o PgClassExpression23
    PgClassExpression24{{"PgClassExpression[24∈3] ➊<br />ᐸ__left_arm__.”mood”ᐳ"}}:::plan
    PgClassExpression23 o--o PgClassExpression24

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value2,__InputObject6,__InputObject8,Access11,Access12,Object13,ApplyInput14 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1,PgInsertSingle10,Object15 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2 bucket2
    classDef bucket3 stroke:#ffa500
    class Bucket3,PgClassExpression17,Access18,List19,Lambda20,PgClassExpression22,PgClassExpression23,PgClassExpression24 bucket3

